#include "test_list.h"

#ifdef TEST_PULSE

#include <den/timer/pulsar.h>

#define TEST_CASE_NAME Den
#define TEST_NUMBER(n) Pulse##_##n


#define TEST_PULSE_000
#define TEST_PULSE_001
#define TEST_PULSE_002

#ifdef TEST_PULSE_000
TEST(TEST_CASE_NAME, TEST_NUMBER(000))
{
     cout<<endl;

     size_t num=0;
     auto wakeup = [&num]()
     {
         cout<<"wakeup!";
         ++num; 
         return true; 
     };

     Pulse pulse(2.0, wakeup);

     for(size_t n=0;n<5;++n)
     {
         pulse.TickTock(0.5);
         pulse.TickTock(0.5);
         pulse.TickTock(0.5);
         pulse.TickTock(0.5);
         EXPECT_EQ(n+1, num );
     }

}
#endif // TEST_PULSE_000


#endif 